package day15_tasks;

public class A_Rectangle extends A_SC{
    private int length;
    private int width;

    public A_Rectangle() {
    }

    public A_Rectangle(int length, int width) {
        this.length = length;
        this.width = width;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    //求面积功能
    public double S() {
        int S = length * width;
        return S;
    }

    //求周长功能
    public double C(){
        int C = 2*length + 2*width;
        return C;
    }
}
